package com.qf.pojo;

import java.util.Objects;

//权限实体类
public class AuthPojo {

    private int auid ;//权限id
    private String auname ;//权限名称
    private String aupath ;//权限路径(/login /list /addUser /delUser)
    private int autype ;//权限类别(1: 菜单 2:请求  3:按钮)
    private int aupid ;//父依赖id(父权限id)

    private boolean isChecked; //当前是否选中

    public boolean isChecked() {
        return isChecked;
    }

    public void setChecked(boolean checked) {
        isChecked = checked;
    }

    public int getAuid() {
        return auid;
    }

    public void setAuid(int auid) {
        this.auid = auid;
    }

    public String getAuname() {
        return auname;
    }

    public void setAuname(String auname) {
        this.auname = auname;
    }

    public String getAupath() {
        return aupath;
    }

    public void setAupath(String aupath) {
        this.aupath = aupath;
    }

    public int getAutype() {
        return autype;
    }

    public void setAutype(int autype) {
        this.autype = autype;
    }

    public int getAupid() {
        return aupid;
    }

    public void setAupid(int aupid) {
        this.aupid = aupid;
    }

    @Override
    public String toString() {
        return "{" +
                "\"auid\":" + auid +
                ", \"auname\":\"" + auname + '\"' +
                ", \"aupath\":\"" + aupath + '\"' +
                ", \"autype\":" + autype +
                ", \"aupid\":" + aupid +
                ", \"checked\":" + isChecked +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AuthPojo authPojo = (AuthPojo) o;
        return auid == authPojo.auid &&
                autype == authPojo.autype &&
                aupid == authPojo.aupid &&
                isChecked == authPojo.isChecked &&
                Objects.equals(auname, authPojo.auname) &&
                Objects.equals(aupath, authPojo.aupath);
    }

    @Override
    public int hashCode() {
        return Objects.hash(auid, auname, aupath, autype, aupid, isChecked);
    }
}


